<?php



/**
 * This class defines the structure of the 'wedstrijd' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.database.map
 */
class WedstrijdTableMap extends TableMap {

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'database.map.WedstrijdTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
	  // attributes
		$this->setName('wedstrijd');
		$this->setPhpName('Wedstrijd');
		$this->setClassname('Wedstrijd');
		$this->setPackage('database');
		$this->setUseIdGenerator(true);
		// columns
		$this->addPrimaryKey('WEDSTRIJDID', 'Wedstrijdid', 'INTEGER', true, 11, null);
		$this->addForeignKey('THUISTEAM', 'Thuisteam', 'INTEGER', 'team', 'TEAMID', true, 11, null);
		$this->addForeignKey('UITTEAM', 'Uitteam', 'INTEGER', 'team', 'TEAMID', true, 11, null);
		$this->addColumn('PUNTENTHUIS', 'Puntenthuis', 'INTEGER', false, 2, null);
		$this->addColumn('PUNTENUIT', 'Puntenuit', 'INTEGER', false, 2, null);
		$this->addColumn('GEELTHUIS', 'Geelthuis', 'INTEGER', false, 1, null);
		$this->addColumn('GEELUIT', 'Geeluit', 'INTEGER', false, 1, null);
		$this->addColumn('ROODTHUIS', 'Roodthuis', 'INTEGER', false, 1, null);
		$this->addColumn('ROODUIT', 'Rooduit', 'INTEGER', false, 1, null);
		$this->addColumn('DATUM', 'Datum', 'TIMESTAMP', true, null, null);
		$this->addColumn('TYPE', 'Type', 'INTEGER', true, 1, null);
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
    $this->addRelation('TeamRelatedByThuisteam', 'Team', RelationMap::MANY_TO_ONE, array('thuisteam' => 'teamID', ), 'RESTRICT', 'RESTRICT');
    $this->addRelation('TeamRelatedByUitteam', 'Team', RelationMap::MANY_TO_ONE, array('uitteam' => 'teamID', ), 'RESTRICT', 'RESTRICT');
    $this->addRelation('Voorspelling', 'Voorspelling', RelationMap::ONE_TO_MANY, array('wedstrijdID' => 'wedstrijdID', ), 'RESTRICT', 'RESTRICT');
	} // buildRelations()

} // WedstrijdTableMap
